package common.enums;

public enum HeightEnum {
	NULL(""),
	BELOW_150CM("below 1.5m"),
	FROM_150_TO_175("1.5-1.75m"),
	FROM_175_TO_200("1.75-2m"),
	ABOVE_200CM("above 2m");
		
	private String text;
	
	HeightEnum(String text) {
	  this.text = text;
	}
	
	public String getText() {
	  return this.text;
	}
	
	@Override
	public String toString() {
		return getText();
	}
	
	public static HeightEnum fromString(String text) {
	    if (text != null) {
	      for (HeightEnum b : HeightEnum.values()) {
	        if (text.equalsIgnoreCase(b.text)) {
	          return b;
		    }
		  }  
	    }
	    
	    return null;   
	}
}